import { createApp } from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import messages from '../locale/index'

import { createI18n } from "vue-i18n"

const language_key = localStorage.getItem('language_key')

let i18nConfig = {
  locale: language_key ? language_key : 'en',
  messages
}

const i18n = createI18n(i18nConfig)
const app = createApp(App)
app.use(i18n).mount("#app")